package com.atmk.atmk.designMode.结构型.适配器模式.对象适配器.适配器类;

import com.atmk.atmk.designMode.结构型.适配器模式.对象适配器.原始类.USASocket;
import com.atmk.atmk.designMode.结构型.适配器模式.对象适配器.目标接口.EuropeanSocket;

public class USASocketAdapter implements EuropeanSocket {
    private USASocket usaSocket;

    public USASocketAdapter(USASocket usaSocket) {
        this.usaSocket = usaSocket;
    }

    @Override
    public void powerWith220V() {
        System.out.println("Adapter is converting 110V to 220V");
        usaSocket.powerWith110V();
        System.out.println("Adapter has converted power supply to 220V");
    }
}
